def get_overlap_rate(start1,end1,start2,end2):
    """计算两个垂直范围的重叠率"""
    overlap_start = max(start1,start2)
    overlap_end =min (end1,end2)
    overlap_length =max(0,overlap_end -overlap_start)
    min_height =min(end1-start1,end2-start2)
    return overlap_length / min_height if min_height != 0 else 0
